package com.java.file;

import java.io.File;

public class FileDemo2 {

	public void list1(String path) {

		File file = new File(path);
		File[] n = file.listFiles();
		for (File f : n) {
			if (f.isFile()) {
				System.out.println(f.getName());
			}
			if (f.isDirectory()) {
				list1(f.getPath());
			}
		}
	}
	public static void main(String[] args) {
		String path = "E";
		FileDemo2 fd = new FileDemo2();
		fd.list1(path);
	}
}
